console.log('1同步');			

setTimeout(function() {			
    console.log('2 宏--->同步');
    process.nextTick(function() {
        console.log('3 宏->微任务');
    })
    new Promise(function(resolve) {
        console.log('4 宏->同步');
        resolve();
    }).then(function() {
        console.log('5 宏->微任务')
    })
})


process.nextTick(function() {	
    console.log('6 微任务');
})


new Promise(function(resolve) {		
    console.log('7 同步');
    resolve();
}).then(function() {
    console.log('8 微任务')		
})


setTimeout(function() {			
    console.log('9 宏->同步');
    process.nextTick(function() {
        console.log('10 宏->微任务');
    })
    new Promise(function(resolve) {
        console.log('11 宏->同步');
        resolve();
    }).then(function() {
        console.log('12 宏-微任务')
    })
})
 
